package com.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dao.UserMapper;
import com.model.User;
import com.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Autowired
    private UserMapper userDao;

    @Override
    public boolean selectCount(String account, String phone) {
        return ((userDao.selectCount(new QueryWrapper<User>().eq("account", account))) > 0) || ((userDao.selectCount(new QueryWrapper<User>().eq("phone", phone))) > 0);
    }
}
